package com.itany.nmms.util;

/**
 * Author: shixiaojun@itany.com
 * Date: 2020/8/14 14:36
 * Version: 1.0SNAPSHOT
 **/
public class ParameterUtil {

    public static boolean isNull(String s){
        if(s == null || "".equals(s)){
            return true;
        }
        return false;
    }

    public static String nextValue(String value){
        int i = Integer.parseInt(value)+1;
        value = "000000"+i;
        return value.substring(value.length()-6);
    }

    public static String escapeString(String s){
        StringBuffer buffer = new StringBuffer();
        if(!ParameterUtil.isNull(s)){
            char[] cs = s.toCharArray();
            for(char c : cs){
                buffer.append("/"+c);
            }
            return buffer.toString();
        }
        return null;
    }


}
